#include <iostream>
#include <cstring>
using namespace std;
struct Node {
	int data;
	Node *pre, *next;
};
void transfer(string s, Node *ah, Node *at) {
	Node *tempNode = ah;
	for (int i = 0; i < s.length(); i++) {
		int temp;
		temp = s[i] - '0';
		Node *n = new Node;
		tempNode->next = n;
		n->pre = tempNode;
		n->next = at;
		at->pre = n;
		tempNode = n;
		n->data = temp;
	}
}
void output(Node *ah,Node *at) {
	while (ah->next != at) {
		ah = ah->next;
		cout << ah->data;
	}
}
int main() {
	Node *ah = new Node;
	Node *at = new Node;
	ah->next = at;
	at->pre = ah;
	string s;
	cin >> s;
	transfer(s, ah, at);
	output(ah,at);
	return 0;
}
